package com.adam.framework.common;

import java.util.ResourceBundle;

/**
 * @author Adam Zhao
 * 
 */
public class GlobalConfig {
	public static GlobalConfig config = new GlobalConfig();
	private ResourceBundle rb = null;

	private GlobalConfig() {
		rb = ResourceBundle.getBundle("globalConfig");
	}

	public static GlobalConfig getInstance() {
		return config;
	}

	public String getConfig(String key) {
		if (key == null)
			return null;

		return rb.getString(key);
	}

	public void reload() {
		rb = ResourceBundle.getBundle("globalConfig");
	}

}
